<h1><%= t(:signup_as_new_user) %></h1>
<% @user.password = @user.password_confirmation = nil %>

<%= error_messages_for :user %>
<% form_for :user, :url => admin_users_path do |f| -%>
  
<p><%= label_tag t(:name) %><br/>
<%= f.text_field :name %></p> 
  
<p><%= label_tag t(:login) %><br/>
<%= f.text_field :login %></p>

<p><%= label_tag t(:email) %><br/>
<%= f.text_field :email %></p>

<p><%= label_tag t(:salary) %><br/>
$ <%= f.text_field :salary %></p>

<p><%= label_tag t(:hours) %><br/>
<%= f.text_field :hours %></p>

<p><%= label_tag t(:genre) %><br/>
<%= f.select :genre, ['m','f'].collect { |g| [t("genre_#{g}"), g] } %></p>

<p><%= label_tag t(:department) %><br/>
<%= f.select :department_id, Department.all.collect { |d| [ d.name, d.id ] }, {:prompt => t(:select_a_department)} %></p>

<p><%= label_tag t(:branch_office) %><br/>
<%= select_tag 'user[branch_office_id]', option_groups_from_collection_for_select(Company.all, :branch_offices, :name, :id, :name) %></p>

<p><%= label_tag t(:password) %><br/>
<%= f.password_field :password %></p>

<p><%= label_tag t(:password_confirmation), t(:confirm_password) %><br/>
<%= f.password_field :password_confirmation %></p>

<p><%= submit_tag t(:sign_up) %></p>
<% end -%>

<p class="back"><%= link_to t(:back), admin_users_path %></p>
